/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package database;

import java.sql.Connection;
import java.sql.Statement;
import javax.swing.JOptionPane;
import oracle.jdbc.pool.OracleDataSource;

/**
 *
 * @author Adell
 */
public class UpdateCache {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String url = "jdbc:oracle:thin:@localhost:1521:XE";
        String name = "hr";
        String pass = "sisil";
        Connection con;
        try {
            OracleDataSource ods = new OracleDataSource();
            ods.setURL(url);
            con = ods.getConnection(name, pass);
            Statement stat = con.createStatement();
            String hapus4 = "DROP TABLE CACHE";
            stat.executeQuery(hapus4);
            String cache = "create table CACHE(DATA varchar2(20))";
            stat.executeQuery(cache);
        } catch (Exception e) {
            JOptionPane.showMessageDialog(null, "error");
        }
    }
}
